package cn.wolfcode.wolf2w.business.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class NoteRabbitConfig {

    @Bean
    public Queue noteQueue() {
        return new Queue("noteQueue", true,false,false);
    }

    @Bean
    public TopicExchange noteExchange() {
        return new TopicExchange("noteExchange", true,false);
    }

    @Bean
    public Binding noteBinding() {
        return new Binding("noteQueue", Binding.DestinationType.QUEUE, "noteExchange",
                "note.#", null);
    }


}
